package com.gemframework.modules.prekit.flow.entity;

import lombok.Data;
import org.activiti.engine.repository.ProcessDefinition;

@Data
public class GemProcdef {

  private String id;
  private String key;
  private String name;
  private String category;
  private String tenantId;
  private Integer version;
  private String description;
  //图资源名称
  private String diagramResourceName;
  //资源名称
  private String resourceName;
  //部署ID
  private String deploymentId;
  private boolean startFormKey;
  private boolean graphicalNotation;
  //是否挂起
  private boolean suspended;

  public GemProcdef(ProcessDefinition processDefinition) {
    setId(processDefinition.getId());
    setKey(processDefinition.getKey());
    setName(processDefinition.getName());
    setCategory(processDefinition.getCategory());
    setTenantId(processDefinition.getTenantId());
    setVersion(processDefinition.getVersion());
    setDescription(processDefinition.getDescription());
    setDiagramResourceName(processDefinition.getDiagramResourceName());
    setResourceName(processDefinition.getResourceName());
    setDeploymentId(processDefinition.getDeploymentId());
    setStartFormKey(processDefinition.hasStartFormKey());
    setGraphicalNotation(processDefinition.hasGraphicalNotation());
    setSuspended(processDefinition.isSuspended());
  }

}